﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.IO;
using System.Text;
using System.Reflection;

public partial class download : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e) 
    {
        string methodName = Request["method"];
        if (string.IsNullOrEmpty(methodName)) return;
        Type type = this.GetType();
        MethodInfo method = type.GetMethod(methodName);
        method.Invoke(this, null);
    }

    public void ExcelFair()
    {
        try
        {
            string id = Request["id"];
            DataTable dt = new sql().GetEnterCompanyList(id);
            if (dt != null && dt.Rows.Count > 0)
            {
                CreateFairExcel(dt, dt.Rows[0]["jf_name"].ToString());
            }
            else
            {
                Response.Write("<script type='text/javascript'>alert('没有数据导出！');</script>");
            }
        }
        catch (Exception e)
        {
            Response.Write("<script type='text/javascript'>alert('导出失败！');</script>");
        }
    }

    public void ExcelJob()
    {
        try
        {
            string type1 = Request["type1"];
            string type2 = Request["type2"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSJobList(type1, type2, sdate, edate);
            if (dt != null && dt.Rows.Count > 0)
            {
                CreateJobExcel2(dt, "招聘职位信息");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelJobByType()
    {
        try
        {
            string type = Request["type"];
            string typename = Request["typename"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSJobByTypeList(type, sdate, edate);
            DataTable dt1 = new sql().GetSJobCountByType(type, sdate, edate);
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dr["jt_id"] = "0";
                dr["jt_name"] = "合计";
                dr["re_count"] = dt1.Rows[0]["jobcount"];
                dr["re_percent"] = 100;
                dt.Rows.Add(dr);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                CreateJobByTypeExcel(typename, sdate, edate, dt, "招聘职位按职位类别统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelJobByEdu()
    {
        try
        {
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSJobByEduList(sdate, edate);
            DataTable dt1 = new sql().GetSJobCountByEdu(sdate, edate);
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dr["di_code"] = "0";
                dr["di_name"] = "合计";
                dr["re_count"] = dt1.Rows[0]["jobcount"];
                dr["re_percent"] = 100;
                dt.Rows.Add(dr);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                CreateJobByEduExcel(sdate, edate, dt, "招聘职位按学历统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelPerson()
    {
        try
        {
            string type1 = Request["type1"];
            string type2 = Request["type2"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSPersonList(type1, type2, sdate, edate);
            if (dt != null && dt.Rows.Count > 0)
            {
                CreatePersonExcel(dt, "求职人才统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelPersonByMajor()
    {
        try
        {
            string type = Request["type"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSPersonByMajorList(type, sdate, edate);
            DataTable dt1 = new sql().GetSPersonCountByMajor(type, sdate, edate);
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dr["ma_id"] = "0";
                dr["ma_name"] = "合计";
                dr["pi_count"] = dt1.Rows[0]["pi_count"];
                dr["pi_percent"] = 100;
                dt.Rows.Add(dr);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                CreatePersonByMajorExcel(sdate, edate, dt, "求职人才按专业统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelPersonByYX()
    {
        try
        {
            string type = Request["type"];
            string typename = Request["typename"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSPersonByYXList(type, sdate, edate);
            DataTable dt1 = new sql().GetSPersonCountByYX(type, sdate, edate);
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dr["jt_id"] = "0";
                dr["jt_name"] = "合计";
                dr["pi_count"] = dt1.Rows[0]["pi_count"];
                dr["pi_percent"] = 100;
                dt.Rows.Add(dr);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                CreatePersonByYXExcel(typename, sdate, edate, dt, "求职人才按求职意向统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelPersonByEdu()
    {
        try
        {
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSPersonByEduList(sdate, edate);
            DataTable dt1 = new sql().GetSPersonCountByEdu(sdate, edate);
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dr["di_code"] = "0";
                dr["di_name"] = "合计";
                dr["pi_count"] = dt1.Rows[0]["pi_count"];
                dr["pi_percent"] = 100;
                dt.Rows.Add(dr);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                CreatePersonByEduExcel(sdate, edate, dt, "求职人才按学历统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelNeed()
    {
        try
        {
            string type1 = Request["type1"];
            string type2 = Request["type2"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSNeedList(type1, type2, sdate, edate);
            if (dt != null && dt.Rows.Count > 0)
            {
                CreateJobExcel(dt, "紧缺人才统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelNeedByType()
    {
        try
        {
            string type = Request["type"];
            string typename = Request["typename"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSNeedByTypeList(type, sdate, edate);
            DataTable dt1 = new sql().GetSNeedCountByType(type, sdate, edate);
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dr["jt_id"] = "0";
                dr["jt_name"] = "合计";
                dr["re_count"] = dt1.Rows[0]["jobcount"];
                dr["re_percent"] = 100;
                dt.Rows.Add(dr);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                CreateJobByTypeExcel(typename, sdate, edate, dt, "紧缺岗位按岗位类型统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelNeedByEdu()
    {
        try
        {
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSNeedByEduList(sdate, edate);
            DataTable dt1 = new sql().GetSNeedCountByEdu(sdate, edate);
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dr["di_code"] = "0";
                dr["di_name"] = "合计";
                dr["re_count"] = dt1.Rows[0]["jobcount"];
                dr["re_percent"] = 100;
                dt.Rows.Add(dr);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                CreateJobByEduExcel(sdate, edate, dt, "紧缺岗位按学历统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelHigh()
    {
        try
        {
            string type1 = Request["type1"];
            string type2 = Request["type2"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSHighList(type1, type2, sdate, edate);
            if (dt != null && dt.Rows.Count > 0)
            {
                CreatePersonExcel(dt, "高级人才统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelHighByMajor()
    {
        try
        {
            string type = Request["type"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSHighByMajorList(type, sdate, edate);
            DataTable dt1 = new sql().GetSHighCountByMajor(type, sdate, edate);
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dr["ma_id"] = "0";
                dr["ma_name"] = "合计";
                dr["pi_count"] = dt1.Rows[0]["pi_count"];
                dr["pi_percent"] = 100;
                dt.Rows.Add(dr);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                CreatePersonByMajorExcel(sdate, edate, dt, "高级人才按专业统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelHighByYX()
    {
        try
        {
            string type = Request["type"];
            string typename = Request["typename"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSHighByYXList(type, sdate, edate);
            DataTable dt1 = new sql().GetSHighCountByYX(type, sdate, edate);
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dr["jt_id"] = "0";
                dr["jt_name"] = "合计";
                dr["pi_count"] = dt1.Rows[0]["pi_count"];
                dr["pi_percent"] = 100;
                dt.Rows.Add(dr);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                CreatePersonByYXExcel(typename, sdate, edate, dt, "高级人才按求职意向统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelHighByEdu()
    {
        try
        {
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSHighByEduList(sdate, edate);
            DataTable dt1 = new sql().GetSHighCountByEdu(sdate, edate);
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dr["di_code"] = "0";
                dr["di_name"] = "合计";
                dr["pi_count"] = dt1.Rows[0]["pi_count"];
                dr["pi_percent"] = 100;
                dt.Rows.Add(dr);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                CreatePersonByEduExcel(sdate, edate, dt, "高级人才按学历统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelStudent()
    {
        try
        {
            string edu = Request["edu"];
            string hard = Request["hard"];
            string will1 = Request["will1"];
            string will2 = Request["will2"];
            string need = Request["need"];
            string go = Request["goto"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSStudentList(edu, hard, will1, will2, need, go, sdate, edate);
            if (dt != null && dt.Rows.Count > 0)
            {
                CreateStudentExcel(dt, "未就业毕业生统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelCompanyByTrade()
    {
        try
        {
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSCompanyByTradeList(sdate, edate);
            DataTable dt1 = new sql().GetSCompanyCountByTrade(sdate, edate);
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dr["di_code"] = "0";
                dr["di_name"] = "合计";
                dr["cu_count"] = dt1.Rows[0]["cu_count"];
                dr["cu_percent"] = 100;
                dt.Rows.Add(dr);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                CreateCompanyByTradeExcel(sdate, edate, dt, "企业按行业统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelCompanyByType()
    {
        try
        {
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSCompanyByTypeList(sdate, edate);

            if (dt != null && dt.Rows.Count > 0)
            {
                CreateCompanyByTypeExcel(sdate, edate, dt, "企业按行业统计");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelShopWindow()
    {
        try
        {
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetShopWindowList(sdate, edate);

            if (dt != null && dt.Rows.Count > 0)
            {
                CreateShopWindowExcel(sdate, edate, dt, "橱窗招聘");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    protected void CreateExcel(DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        for (int i = 0; i < dt.Columns.Count; i++)
        {
            strb.Append(" <td> <b>" + dt.Columns[i] + " </b> </td>");
        }
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                strb.Append(" <td class='xl26'>" + dt.Rows[i][j].ToString() + " </td>");
            }
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    protected void CreateFairExcel(DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td colspan='9' align='center'> <b>" + fileName + "</b> </td>");
        strb.Append(" </tr>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>单位名称</b> </td>");
        strb.Append(" <td> <b>联 系 人</b> </td>");
        strb.Append(" <td> <b>联系电话</b> </td>");
        strb.Append(" <td> <b>招聘岗位</b> </td>");
        strb.Append(" <td> <b>人    数</b> </td>");
        strb.Append(" <td> <b>学    历</b> </td>");
        strb.Append(" <td> <b>月薪待遇</b> </td>");
        strb.Append(" <td> <b>其他要求</b> </td>");
        strb.Append(" <td> <b>住宿</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            int j = 1;
            if (!string.IsNullOrEmpty(dt.Rows[i]["je_recruit2"].ToString()))
                j++;
            if (!string.IsNullOrEmpty(dt.Rows[i]["je_recruit3"].ToString()))
                j++;
            if (!string.IsNullOrEmpty(dt.Rows[i]["je_recruit4"].ToString()))
                j++;
            if (!string.IsNullOrEmpty(dt.Rows[i]["je_recruit5"].ToString()))
                j++;
            if (!string.IsNullOrEmpty(dt.Rows[i]["je_recruit6"].ToString()))
                j++;
            strb.Append(" <td class='xl26' rowspan='" + j + "'>" + dt.Rows[i]["je_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26' rowspan='" + j + "'>" + dt.Rows[i]["je_contact"].ToString() + " </td>");
            strb.Append(" <td class='xl26' rowspan='" + j + "'>" + dt.Rows[i]["je_tel"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_recruit1"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_num1"].ToString() + " </td>");
            string edu = "";
            if ("1".Equals(dt.Rows[i]["je_edu1"].ToString()))
                edu = "初中";
            else if ("2".Equals(dt.Rows[i]["je_edu1"].ToString()))
                edu = "高中";
            else if ("3".Equals(dt.Rows[i]["je_edu1"].ToString()))
                edu = "中技";
            else if ("4".Equals(dt.Rows[i]["je_edu1"].ToString()))
                edu = "中专";
            else if ("5".Equals(dt.Rows[i]["je_edu1"].ToString()))
                edu = "大专";
            else if ("6".Equals(dt.Rows[i]["je_edu1"].ToString()))
                edu = "本科";
            else if ("7".Equals(dt.Rows[i]["je_edu1"].ToString()))
                edu = "硕士";
            else if ("8".Equals(dt.Rows[i]["je_edu1"].ToString()))
                edu = "博士";
            else if ("9".Equals(dt.Rows[i]["je_edu1"].ToString()))
                edu = "博士后";
            else if ("99".Equals(dt.Rows[i]["je_edu1"].ToString()))
                edu = "不限";
            strb.Append(" <td class='xl26'>" + edu + dt.Rows[i]["je_edumore1"].ToString() + " </td>");
            string pay = "";
            if ("1".Equals(dt.Rows[i]["je_pay1"].ToString()))
                pay = "1000~1500";
            else if ("2".Equals(dt.Rows[i]["je_pay1"].ToString()))
                pay = "1500~2000";
            else if ("3".Equals(dt.Rows[i]["je_pay1"].ToString()))
                pay = "2000~3000";
            else if ("4".Equals(dt.Rows[i]["je_pay1"].ToString()))
                pay = "3000~5000";
            else if ("5".Equals(dt.Rows[i]["je_pay1"].ToString()))
                pay = "5000~10000";
            else if ("6".Equals(dt.Rows[i]["je_pay1"].ToString()))
                pay = "10000以上";
            strb.Append(" <td class='xl26'>" + pay + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_memo1"].ToString() + " </td>");
            strb.Append(" <td class='xl26' rowspan='" + j + "'>" + dt.Rows[i]["je_stay"].ToString() + " </td>");
            strb.Append(" </tr>");
            if (!string.IsNullOrEmpty(dt.Rows[i]["je_recruit2"].ToString()))
            {
                strb.Append(" <tr>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_recruit2"].ToString() + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_num2"].ToString() + " </td>");
                edu = "";
                if ("1".Equals(dt.Rows[i]["je_edu2"].ToString()))
                    edu = "初中";
                else if ("2".Equals(dt.Rows[i]["je_edu2"].ToString()))
                    edu = "高中";
                else if ("3".Equals(dt.Rows[i]["je_edu2"].ToString()))
                    edu = "中技";
                else if ("4".Equals(dt.Rows[i]["je_edu2"].ToString()))
                    edu = "中专";
                else if ("5".Equals(dt.Rows[i]["je_edu2"].ToString()))
                    edu = "大专";
                else if ("6".Equals(dt.Rows[i]["je_edu2"].ToString()))
                    edu = "本科";
                else if ("7".Equals(dt.Rows[i]["je_edu2"].ToString()))
                    edu = "硕士";
                else if ("8".Equals(dt.Rows[i]["je_edu2"].ToString()))
                    edu = "博士";
                else if ("9".Equals(dt.Rows[i]["je_edu2"].ToString()))
                    edu = "博士后";
                else if ("99".Equals(dt.Rows[i]["je_edu2"].ToString()))
                    edu = "不限";
                strb.Append(" <td class='xl26'>" + edu + dt.Rows[i]["je_edumore2"].ToString() + " </td>");
                pay = "";
                if ("1".Equals(dt.Rows[i]["je_pay2"].ToString()))
                    pay = "1000~1500";
                else if ("2".Equals(dt.Rows[i]["je_pay2"].ToString()))
                    pay = "1500~2000";
                else if ("3".Equals(dt.Rows[i]["je_pay2"].ToString()))
                    pay = "2000~3000";
                else if ("4".Equals(dt.Rows[i]["je_pay2"].ToString()))
                    pay = "3000~5000";
                else if ("5".Equals(dt.Rows[i]["je_pay2"].ToString()))
                    pay = "5000~10000";
                else if ("6".Equals(dt.Rows[i]["je_pay2"].ToString()))
                    pay = "10000以上";
                strb.Append(" <td class='xl26'>" + pay + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_memo2"].ToString() + " </td>");
                strb.Append(" </tr>");
            }
            if (!string.IsNullOrEmpty(dt.Rows[i]["je_recruit3"].ToString()))
            {
                strb.Append(" <tr>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_recruit3"].ToString() + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_num3"].ToString() + " </td>");
                edu = "";
                if ("1".Equals(dt.Rows[i]["je_edu3"].ToString()))
                    edu = "初中";
                else if ("2".Equals(dt.Rows[i]["je_edu3"].ToString()))
                    edu = "高中";
                else if ("3".Equals(dt.Rows[i]["je_edu3"].ToString()))
                    edu = "中技";
                else if ("4".Equals(dt.Rows[i]["je_edu3"].ToString()))
                    edu = "中专";
                else if ("5".Equals(dt.Rows[i]["je_edu3"].ToString()))
                    edu = "大专";
                else if ("6".Equals(dt.Rows[i]["je_edu3"].ToString()))
                    edu = "本科";
                else if ("7".Equals(dt.Rows[i]["je_edu3"].ToString()))
                    edu = "硕士";
                else if ("8".Equals(dt.Rows[i]["je_edu3"].ToString()))
                    edu = "博士";
                else if ("9".Equals(dt.Rows[i]["je_edu3"].ToString()))
                    edu = "博士后";
                else if ("99".Equals(dt.Rows[i]["je_edu3"].ToString()))
                    edu = "不限";
                strb.Append(" <td class='xl26'>" + edu + dt.Rows[i]["je_edumore3"].ToString() + " </td>");
                pay = "";
                if ("1".Equals(dt.Rows[i]["je_pay3"].ToString()))
                    pay = "1000~1500";
                else if ("2".Equals(dt.Rows[i]["je_pay3"].ToString()))
                    pay = "1500~2000";
                else if ("3".Equals(dt.Rows[i]["je_pay3"].ToString()))
                    pay = "2000~3000";
                else if ("4".Equals(dt.Rows[i]["je_pay3"].ToString()))
                    pay = "3000~5000";
                else if ("5".Equals(dt.Rows[i]["je_pay3"].ToString()))
                    pay = "5000~10000";
                else if ("6".Equals(dt.Rows[i]["je_pay3"].ToString()))
                    pay = "10000以上";
                strb.Append(" <td class='xl26'>" + pay + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_memo3"].ToString() + " </td>");
                strb.Append(" </tr>");
            }
            if (!string.IsNullOrEmpty(dt.Rows[i]["je_recruit4"].ToString()))
            {
                strb.Append(" <tr>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_recruit4"].ToString() + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_num4"].ToString() + " </td>");
                edu = "";
                if ("1".Equals(dt.Rows[i]["je_edu4"].ToString()))
                    edu = "初中";
                else if ("2".Equals(dt.Rows[i]["je_edu4"].ToString()))
                    edu = "高中";
                else if ("3".Equals(dt.Rows[i]["je_edu4"].ToString()))
                    edu = "中技";
                else if ("4".Equals(dt.Rows[i]["je_edu4"].ToString()))
                    edu = "中专";
                else if ("5".Equals(dt.Rows[i]["je_edu4"].ToString()))
                    edu = "大专";
                else if ("6".Equals(dt.Rows[i]["je_edu4"].ToString()))
                    edu = "本科";
                else if ("7".Equals(dt.Rows[i]["je_edu4"].ToString()))
                    edu = "硕士";
                else if ("8".Equals(dt.Rows[i]["je_edu4"].ToString()))
                    edu = "博士";
                else if ("9".Equals(dt.Rows[i]["je_edu4"].ToString()))
                    edu = "博士后";
                else if ("99".Equals(dt.Rows[i]["je_edu4"].ToString()))
                    edu = "不限";
                strb.Append(" <td class='xl26'>" + edu + dt.Rows[i]["je_edumore4"].ToString() + " </td>");
                pay = "";
                if ("1".Equals(dt.Rows[i]["je_pay4"].ToString()))
                    pay = "1000~1500";
                else if ("2".Equals(dt.Rows[i]["je_pay4"].ToString()))
                    pay = "1500~2000";
                else if ("3".Equals(dt.Rows[i]["je_pay4"].ToString()))
                    pay = "2000~3000";
                else if ("4".Equals(dt.Rows[i]["je_pay4"].ToString()))
                    pay = "3000~5000";
                else if ("5".Equals(dt.Rows[i]["je_pay4"].ToString()))
                    pay = "5000~10000";
                else if ("6".Equals(dt.Rows[i]["je_pay4"].ToString()))
                    pay = "10000以上";
                strb.Append(" <td class='xl26'>" + pay + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_memo4"].ToString() + " </td>");
                strb.Append(" </tr>");
            }
            if (!string.IsNullOrEmpty(dt.Rows[i]["je_recruit5"].ToString()))
            {
                strb.Append(" <tr>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_recruit5"].ToString() + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_num5"].ToString() + " </td>");
                edu = "";
                if ("1".Equals(dt.Rows[i]["je_edu5"].ToString()))
                    edu = "初中";
                else if ("2".Equals(dt.Rows[i]["je_edu5"].ToString()))
                    edu = "高中";
                else if ("3".Equals(dt.Rows[i]["je_edu5"].ToString()))
                    edu = "中技";
                else if ("4".Equals(dt.Rows[i]["je_edu5"].ToString()))
                    edu = "中专";
                else if ("5".Equals(dt.Rows[i]["je_edu5"].ToString()))
                    edu = "大专";
                else if ("6".Equals(dt.Rows[i]["je_edu5"].ToString()))
                    edu = "本科";
                else if ("7".Equals(dt.Rows[i]["je_edu5"].ToString()))
                    edu = "硕士";
                else if ("8".Equals(dt.Rows[i]["je_edu5"].ToString()))
                    edu = "博士";
                else if ("9".Equals(dt.Rows[i]["je_edu5"].ToString()))
                    edu = "博士后";
                else if ("99".Equals(dt.Rows[i]["je_edu5"].ToString()))
                    edu = "不限";
                strb.Append(" <td class='xl26'>" + edu + dt.Rows[i]["je_edumore5"].ToString() + " </td>");
                pay = "";
                if ("1".Equals(dt.Rows[i]["je_pay5"].ToString()))
                    pay = "1000~1500";
                else if ("2".Equals(dt.Rows[i]["je_pay5"].ToString()))
                    pay = "1500~2000";
                else if ("3".Equals(dt.Rows[i]["je_pay5"].ToString()))
                    pay = "2000~3000";
                else if ("4".Equals(dt.Rows[i]["je_pay5"].ToString()))
                    pay = "3000~5000";
                else if ("5".Equals(dt.Rows[i]["je_pay5"].ToString()))
                    pay = "5000~10000";
                else if ("6".Equals(dt.Rows[i]["je_pay5"].ToString()))
                    pay = "10000以上";
                strb.Append(" <td class='xl26'>" + pay + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_memo5"].ToString() + " </td>");
                strb.Append(" </tr>");
            }
            if (!string.IsNullOrEmpty(dt.Rows[i]["je_recruit6"].ToString()))
            {
                strb.Append(" <tr>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_recruit6"].ToString() + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_num6"].ToString() + " </td>");
                edu = "";
                if ("1".Equals(dt.Rows[i]["je_edu6"].ToString()))
                    edu = "初中";
                else if ("2".Equals(dt.Rows[i]["je_edu6"].ToString()))
                    edu = "高中";
                else if ("3".Equals(dt.Rows[i]["je_edu6"].ToString()))
                    edu = "中技";
                else if ("4".Equals(dt.Rows[i]["je_edu6"].ToString()))
                    edu = "中专";
                else if ("5".Equals(dt.Rows[i]["je_edu6"].ToString()))
                    edu = "大专";
                else if ("6".Equals(dt.Rows[i]["je_edu6"].ToString()))
                    edu = "本科";
                else if ("7".Equals(dt.Rows[i]["je_edu6"].ToString()))
                    edu = "硕士";
                else if ("8".Equals(dt.Rows[i]["je_edu6"].ToString()))
                    edu = "博士";
                else if ("9".Equals(dt.Rows[i]["je_edu6"].ToString()))
                    edu = "博士后";
                else if ("99".Equals(dt.Rows[i]["je_edu6"].ToString()))
                    edu = "不限";
                strb.Append(" <td class='xl26'>" + edu + dt.Rows[i]["je_edumore6"].ToString() + " </td>");
                pay = "";
                if ("1".Equals(dt.Rows[i]["je_pay6"].ToString()))
                    pay = "1000~1500";
                else if ("2".Equals(dt.Rows[i]["je_pay6"].ToString()))
                    pay = "1500~2000";
                else if ("3".Equals(dt.Rows[i]["je_pay6"].ToString()))
                    pay = "2000~3000";
                else if ("4".Equals(dt.Rows[i]["je_pay6"].ToString()))
                    pay = "3000~5000";
                else if ("5".Equals(dt.Rows[i]["je_pay6"].ToString()))
                    pay = "5000~10000";
                else if ("6".Equals(dt.Rows[i]["je_pay6"].ToString()))
                    pay = "10000以上";
                strb.Append(" <td class='xl26'>" + pay + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["je_memo6"].ToString() + " </td>");
                strb.Append(" </tr>");
            }
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser) || "InternetExplorer".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();

    }

    protected void CreateJobExcel(DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>企业名称</b> </td>");
        strb.Append(" <td> <b>职位名称</b> </td>");
        strb.Append(" <td> <b>招聘人数</b> </td>");
        strb.Append(" <td> <b>工作地区</b> </td>");
        strb.Append(" <td> <b>性别要求</b> </td>");
        strb.Append(" <td> <b>工作性质</b> </td>");
        strb.Append(" <td> <b>学历要求</b> </td>");
        strb.Append(" <td> <b>招聘对象</b> </td>");
        strb.Append(" <td> <b>岗位类别1</b> </td>");
        strb.Append(" <td> <b>岗位类别11</b> </td>");
        strb.Append(" <td> <b>岗位类别2</b> </td>");
        strb.Append(" <td> <b>岗位类别22</b> </td>");
        strb.Append(" <td> <b>年龄要求</b> </td>");
        strb.Append(" <td> <b>待遇</b> </td>");
        strb.Append(" <td> <b>点击率</b> </td>");
        strb.Append(" <td> <b>应聘数</b> </td>");
        strb.Append(" <td> <b>发布日期</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["cu_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_name"].ToString() + " </td>");
            if ("0".Equals(dt.Rows[i]["re_num"].ToString()))
                strb.Append(" <td class='xl26'>若干 </td>");
            else
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_num"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["area"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["sex"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["kind"].ToString() + " </td>");
            if (!string.IsNullOrEmpty(dt.Rows[i]["re_edu2"].ToString()))
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["edu"].ToString() + dt.Rows[i]["re_edu2"].ToString() + " </td>");
            else
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["edu"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["target"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["jobtype1"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["jobtype11"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["jobtype2"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["jobtype22"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_age"].ToString() + " </td>");
            if ("1".Equals(dt.Rows[i]["re_pay1"].ToString()))
                strb.Append(" <td class='xl26'>1000~1500 </td>");
            else if ("2".Equals(dt.Rows[i]["re_pay1"].ToString()))
                strb.Append(" <td class='xl26'>1500~2000 </td>");
            else if ("3".Equals(dt.Rows[i]["re_pay1"].ToString()))
                strb.Append(" <td class='xl26'>2000~3000 </td>");
            else if ("4".Equals(dt.Rows[i]["re_pay1"].ToString()))
                strb.Append(" <td class='xl26'>3000~5000 </td>");
            else if ("5".Equals(dt.Rows[i]["re_pay1"].ToString()))
                strb.Append(" <td class='xl26'>5000~10000 </td>");
            else if ("6".Equals(dt.Rows[i]["re_pay1"].ToString()))
                strb.Append(" <td class='xl26'>10000以上 </td>");
            else
                strb.Append(" <td class='xl26'>面议 </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_hits"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_resumenum"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_inserttime"].ToString() + " </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    protected void CreateJobExcel2(DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        //strb.Append(" <tr>");
        //strb.Append(" <td> <b>企业名称</b> </td>");
        //strb.Append(" <td> <b>职位名称</b> </td>");
        //strb.Append(" <td> <b>招聘人数</b> </td>");
        //strb.Append(" <td> <b>工作地区</b> </td>");
        //strb.Append(" <td> <b>性别要求</b> </td>");
        //strb.Append(" <td> <b>工作性质</b> </td>");
        //strb.Append(" <td> <b>学历要求</b> </td>");
        //strb.Append(" <td> <b>招聘对象</b> </td>");
        //strb.Append(" <td> <b>岗位类别1</b> </td>");
        //strb.Append(" <td> <b>岗位类别11</b> </td>");
        //strb.Append(" <td> <b>岗位类别2</b> </td>");
        //strb.Append(" <td> <b>岗位类别22</b> </td>");
        //strb.Append(" <td> <b>年龄要求</b> </td>");
        //strb.Append(" <td> <b>待遇</b> </td>");
        //strb.Append(" <td> <b>点击率</b> </td>");
        //strb.Append(" <td> <b>应聘数</b> </td>");
        //strb.Append(" <td> <b>发布日期</b> </td>");
        //strb.Append(" </tr>");
        string id = "";
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            if (!id.Equals(dt.Rows[i]["cu_no"].ToString()))
            {
                strb.Append(" <tr>");
                strb.Append(" <td colspan='4' class='xl26'>" + dt.Rows[i]["cu_name"].ToString() + " </td>");
                strb.Append(" </tr>");
            }
            strb.Append(" <tr>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_name"].ToString() + " </td>");
            if ("0".Equals(dt.Rows[i]["re_num"].ToString()))
                strb.Append(" <td class='xl26'>若干 </td>");
            else
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_num"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["sex"].ToString() + " </td>");
            if (!string.IsNullOrEmpty(dt.Rows[i]["re_edu2"].ToString()))
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["edu"].ToString() + dt.Rows[i]["re_edu2"].ToString() + " </td>");
            else
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["edu"].ToString() + " </td>");
            strb.Append(" </tr>");

            if (i < dt.Rows.Count - 1)
            {
                if (!dt.Rows[i]["cu_no"].ToString().Equals(dt.Rows[i + 1]["cu_no"].ToString()))
                {
                    strb.Append(" <tr>");
                    strb.Append(" <td class='xl26'>联系人：" + dt.Rows[i]["cu_contact"].ToString() + " </td>");
                    strb.Append(" <td colspan='3' class='xl26'>联系方式：" + dt.Rows[i]["cu_tel"].ToString() + " </td>");
                    strb.Append(" </tr>");
                    strb.Append(" <tr>");
                    strb.Append(" <td colspan='4' class='xl26'>地址：" + dt.Rows[i]["cu_address"].ToString() + " </td>");
                    strb.Append(" </tr>");
                    strb.Append(" <tr>");
                    strb.Append(" <td class='xl26'></td>");
                    strb.Append(" </tr>");
                }
            }
            else
            {
                strb.Append(" <tr>");
                strb.Append(" <td class='xl26'>联系人：" + dt.Rows[i]["cu_contact"].ToString() + " </td>");
                strb.Append(" <td colspan='3' class='xl26'>联系方式：" + dt.Rows[i]["cu_tel"].ToString() + " </td>");
                strb.Append(" </tr>");
                strb.Append(" <tr>");
                strb.Append(" <td colspan='4' class='xl26'>地址：" + dt.Rows[i]["cu_address"].ToString() + " </td>");
                strb.Append(" </tr>");
            }
            id = dt.Rows[i]["cu_no"].ToString();
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    protected void CreateJobByTypeExcel(string type, string sdate, string edate, DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>时间段</b> </td>");
        strb.Append(" <td colspan=\"2\"> <b>" + sdate + " 至 " + edate + "</b> </td>");
        strb.Append(" </tr>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>岗位类别</b> </td>");
        strb.Append(" <td> <b>招聘岗位数</b> </td>");
        strb.Append(" <td> <b>所占比例</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            if(string.IsNullOrEmpty(dt.Rows[i]["jt_name"].ToString()))
                strb.Append(" <td class='xl26'>" + type + " </td>");
            else
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["jt_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_count"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_percent"].ToString() + "% </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    protected void CreateJobByEduExcel(string sdate, string edate, DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>时间段</b> </td>");
        strb.Append(" <td colspan=\"2\"> <b>" + sdate + " 至 " + edate + "</b> </td>");
        strb.Append(" </tr>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>学历</b> </td>");
        strb.Append(" <td> <b>招聘岗位数</b> </td>");
        strb.Append(" <td> <b>所占比例</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["di_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_count"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_percent"].ToString() + "% </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    protected void CreatePersonExcel(DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>姓名</b> </td>");
        strb.Append(" <td> <b>性别</b> </td>");
        strb.Append(" <td> <b>学历</b> </td>");
        strb.Append(" <td> <b>专业</b> </td>");
        strb.Append(" <td> <b>求职意向1</b> </td>");
        strb.Append(" <td> <b>求职意向11</b> </td>");
        strb.Append(" <td> <b>求职意向2</b> </td>");
        strb.Append(" <td> <b>求职意向22</b> </td>");
        strb.Append(" <td> <b>外语水平</b> </td>");
        strb.Append(" <td> <b>计算机水平</b> </td>");
        strb.Append(" <td> <b>职称</b> </td>");
        strb.Append(" <td> <b>毕业学校</b> </td>");
        strb.Append(" <td> <b>毕业时间</b> </td>");
        strb.Append(" <td> <b>期望月薪</b> </td>");
        strb.Append(" <td> <b>工作地区</b> </td>");
        strb.Append(" <td> <b>工作性质</b> </td>");
        strb.Append(" <td> <b>浏览量</b> </td>");
        strb.Append(" <td> <b>更新日期</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["sex"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["edu"].ToString() + " </td>");
            if (!string.IsNullOrEmpty(dt.Rows[i]["pi_sp"].ToString()))
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["spcode"].ToString() + dt.Rows[i]["pi_sp"].ToString() + " </td>");
            else
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["spcode"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["yx1"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["yx11"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["yx2"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["yx22"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_forlang"].ToString() + dt.Rows[i]["pi_forlevel"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_computer"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_zhicheng"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_college"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_bysj"].ToString() + " </td>");
            if ("1".Equals(dt.Rows[i]["pi_mt"].ToString()))
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_pay"].ToString() + "(可面谈) </td>");
            else
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_pay"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["area"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["kind"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_hits"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_lastchgtime"].ToString() + " </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    protected void CreatePersonByMajorExcel(string sdate, string edate, DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>时间段</b> </td>");
        strb.Append(" <td colspan=\"2\"> <b>" + sdate + " 至 " + edate + "</b> </td>");
        strb.Append(" </tr>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>专业类别</b> </td>");
        strb.Append(" <td> <b>求职人才数</b> </td>");
        strb.Append(" <td> <b>所占比例</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            if(string.IsNullOrEmpty(dt.Rows[i]["ma_name"].ToString()))
                strb.Append(" <td class='xl26'>其它类 </td>");
            else
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["ma_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_count"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_percent"].ToString() + "% </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    protected void CreatePersonByYXExcel(string type, string sdate, string edate, DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>时间段</b> </td>");
        strb.Append(" <td colspan=\"2\"> <b>" + sdate + " 至 " + edate + "</b> </td>");
        strb.Append(" </tr>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>求职意向</b> </td>");
        strb.Append(" <td> <b>求职人才数</b> </td>");
        strb.Append(" <td> <b>所占比例</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            if (string.IsNullOrEmpty(dt.Rows[i]["jt_name"].ToString()))
                strb.Append(" <td class='xl26'>" + type + " </td>");
            else
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["jt_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_count"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_percent"].ToString() + "% </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    protected void CreatePersonByEduExcel(string sdate, string edate, DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>时间段</b> </td>");
        strb.Append(" <td colspan=\"2\"> <b>" + sdate + " 至 " + edate + "</b> </td>");
        strb.Append(" </tr>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>学历</b> </td>");
        strb.Append(" <td> <b>求职人才数</b> </td>");
        strb.Append(" <td> <b>所占比例</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["di_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_count"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_percent"].ToString() + "% </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    protected void CreateStudentExcel(DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>姓名</b> </td>");
        strb.Append(" <td> <b>身份证号码</b> </td>");
        strb.Append(" <td> <b>出生日期</b> </td>");
        strb.Append(" <td> <b>性别</b> </td>");
        strb.Append(" <td> <b>民族</b> </td>");
        strb.Append(" <td> <b>学历</b> </td>");
        strb.Append(" <td> <b>毕业院校</b> </td>");
        strb.Append(" <td> <b>毕业时间</b> </td>");
        strb.Append(" <td> <b>所在院系（专业）</b> </td>");
        strb.Append(" <td> <b>入学前户口所在地</b> </td>");
        strb.Append(" <td> <b>现居住详细地址</b> </td>");
        strb.Append(" <td> <b>联系方式</b> </td>");
        strb.Append(" <td> <b>困难类型</b> </td>");
        //strb.Append(" <td> <b>困难类型注明</b> </td>");
        strb.Append(" <td> <b>就业去向</b> </td>");
        strb.Append(" <td> <b>登记时间</b> </td>");
        strb.Append(" <td> <b>求职意向</b> </td>");
        strb.Append(" <td> <b>就业服务需求</b> </td>");
        //strb.Append(" <td> <b>工作地区</b> </td>");
        //strb.Append(" <td> <b>就业类型</b> </td>");
        //strb.Append(" <td> <b>工作岗位</b> </td>");
        //strb.Append(" <td> <b>待遇期望工资</b> </td>");
        //strb.Append(" <td> <b>单位名称</b> </td>");
        //strb.Append(" <td> <b>岗位名称</b> </td>");
        //strb.Append(" <td> <b>其他说明情况</b> </td>");
        //strb.Append(" <td> <b>政治面貌</b> </td>");
        //strb.Append(" <td> <b>特长</b> </td>");
        //strb.Append(" <td> <b>届别情况</b> </td>");
        //strb.Append(" <td> <b>现户口所在地</b> </td>");
        //strb.Append(" <td> <b>有无执（职）业资格</b> </td>");
        //strb.Append(" <td> <b>取得时间</b> </td>");
        //strb.Append(" <td> <b>有无专业技术资格</b> </td>");
        //strb.Append(" <td> <b>取得时间</b> </td>");
        //strb.Append(" <td> <b>电子邮箱</b> </td>");
        //strb.Append(" <td> <b>常用联系人</b> </td>");
        //strb.Append(" <td> <b>有无就业经历</b> </td>");
        //strb.Append(" <td> <b>起止时间</b> </td>");
        //strb.Append(" <td> <b>单位名称</b> </td>");
        //strb.Append(" <td> <b>所在岗位</b> </td>");
        //strb.Append(" <td> <b>有无见习经历</b> </td>");
        //strb.Append(" <td> <b>起止时间</b> </td>");
        //strb.Append(" <td> <b>单位名称</b> </td>");
        //strb.Append(" <td> <b>所在岗位</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_card"].ToString() + " </td>");
            string b = "";
            if(!string.IsNullOrEmpty(dt.Rows[i]["st_birth"].ToString()))
                b = dt.Rows[i]["st_birth"].ToString().Substring(0, 10);
            strb.Append(" <td class='xl26'>" + b + " </td>");
            if ("0".Equals(dt.Rows[i]["st_sex"].ToString()))
                strb.Append(" <td class='xl26'>男 </td>");
            else if ("1".Equals(dt.Rows[i]["st_sex"].ToString()))
                strb.Append(" <td class='xl26'>女 </td>");
            else
                strb.Append(" <td class='xl26'> </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_nation"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_edu"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_school"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_finishtime"].ToString().Substring(0, 10) + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_profession"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_yyhk"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_address"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_tel"].ToString() + " </td>");

            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_zzmm"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_techang"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_jiebie"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_xzhk"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_zhiyezg"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_zhiyezgtime"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_zhuanyezg"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_zhuanyezgtime"].ToString() + " </td>");

            if ("0".Equals(dt.Rows[i]["st_hard"].ToString()))
                strb.Append(" <td class='xl26'>不属于困难毕业生 </td>");
            else if ("1".Equals(dt.Rows[i]["st_hard"].ToString()))
                strb.Append(" <td class='xl26'>城乡低保 </td>");
            else if ("2".Equals(dt.Rows[i]["st_hard"].ToString()))
                strb.Append(" <td class='xl26'>低保边缘户 </td>");
            else if ("3".Equals(dt.Rows[i]["st_hard"].ToString()))
                strb.Append(" <td class='xl26'>城镇零就业家庭 </td>");
            else if ("4".Equals(dt.Rows[i]["st_hard"].ToString()))
                strb.Append(" <td class='xl26'>父母亲患重大疾病造成家庭经济特别困难 </td>");
            else if ("5".Equals(dt.Rows[i]["st_hard"].ToString()))
                strb.Append(" <td class='xl26'>烈士子女 </td>");
            else if ("6".Equals(dt.Rows[i]["st_hard"].ToString()))
                strb.Append(" <td class='xl26'>家庭遭遇重大变故造成家庭经济特别困难 </td>");
            else if ("7".Equals(dt.Rows[i]["st_hard"].ToString()))
                strb.Append(" <td class='xl26'>孤儿 </td>");
            else if ("8".Equals(dt.Rows[i]["st_hard"].ToString()))
                strb.Append(" <td class='xl26'>残疾毕业生 </td>");
            else if ("9".Equals(dt.Rows[i]["st_hard"].ToString()))
                strb.Append(" <td class='xl26'>其他 " + dt.Rows[i]["st_hardmemo"].ToString() + "</td>");
            else
                strb.Append(" <td class='xl26'> </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_hardmemo"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_email"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_lianxr"].ToString() + " </td>");

            //if (!string.IsNullOrEmpty(dt.Rows[i]["st_jycompany"].ToString()))
            //    strb.Append(" <td class='xl26'>有 </td>");
            //else
            //    strb.Append(" <td class='xl26'> </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_jytimes"].ToString() + "至" + dt.Rows[i]["st_jytimed"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_jycompany"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_jywork"].ToString() + " </td>");

            //if (!string.IsNullOrEmpty(dt.Rows[i]["st_jxcompany"].ToString()))
            //    strb.Append(" <td class='xl26'>有 </td>");
            //else
            //    strb.Append(" <td class='xl26'> </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_jxtimes"].ToString() + "至" + dt.Rows[i]["st_jxtimed"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_jxcompany"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_jxwork"].ToString() + " </td>");

            strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_gotocompany"].ToString() + dt.Rows[i]["st_gotowork"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_inserttime"].ToString().Substring(0,10) + " </td>");
            if ("0".Equals(dt.Rows[i]["st_will"].ToString()))
            {
                strb.Append(" <td class='xl26'>自愿暂时不就业");
                if (!string.IsNullOrEmpty(dt.Rows[i]["st_willmemo"].ToString()))
                    strb.Append("(" + dt.Rows[i]["st_willmemo"].ToString() + ")");
                strb.Append(" </td>");
            }
            else
            {
                if ("0".Equals(dt.Rows[i]["st_willwork"].ToString()))
                    strb.Append(" <td class='xl26'>不限 </td>");
                else
                {
                    string work = "";
                    if (!string.IsNullOrEmpty(dt.Rows[i]["st_willwork1"].ToString()))
                        work = dt.Rows[i]["st_willwork1"].ToString() + "/";
                    if (!string.IsNullOrEmpty(dt.Rows[i]["st_willwork2"].ToString()))
                        work += dt.Rows[i]["st_willwork2"].ToString();
                    strb.Append(" <td class='xl26'>" + work.Trim('/') + " </td>");
                }
            }
            strb.Append(" <td class='xl26'>");
            string will2 = "";
            if (dt.Rows[i]["st_need"].ToString().Contains(",1,"))
                will2 = "政策咨询/";
            if (dt.Rows[i]["st_need"].ToString().Contains(",2,"))
                will2 += "就业指导/";
            if (dt.Rows[i]["st_need"].ToString().Contains(",3,"))
                will2 += "就业见习/";
            if (dt.Rows[i]["st_need"].ToString().Contains(",4,"))
                will2 += "推荐就业/";
            if (dt.Rows[i]["st_need"].ToString().Contains(",5,"))
                will2 += "职业培训/";
            if (dt.Rows[i]["st_need"].ToString().Contains(",6,"))
                will2 += "创业服务/";
            if (dt.Rows[i]["st_need"].ToString().Contains(",7,"))
                will2 += "小额贷款/";
            if (dt.Rows[i]["st_need"].ToString().Contains(",8,"))
                will2 += "其他";
            strb.Append(will2.Trim('/'));
            if (!string.IsNullOrEmpty(dt.Rows[i]["st_needmemo"].ToString()))
                strb.Append("(" + dt.Rows[i]["st_needmemo"].ToString() + ")");
            strb.Append(" </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_willmoney"].ToString() + "元/月 </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_willarea"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_willkind"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_gotocompany"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_gotowork"].ToString() + " </td>");
            //strb.Append(" <td class='xl26'>" + dt.Rows[i]["st_memo"].ToString() + " </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    protected void CreateCompanyByTradeExcel(string sdate, string edate, DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>时间段</b> </td>");
        strb.Append(" <td colspan=\"2\"> <b>" + sdate + " 至 " + edate + "</b> </td>");
        strb.Append(" </tr>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>行业</b> </td>");
        strb.Append(" <td> <b>企业数</b> </td>");
        strb.Append(" <td> <b>所占比例</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["di_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["cu_count"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["cu_percent"].ToString() + "% </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    protected void CreateCompanyByTypeExcel(string sdate, string edate, DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>发布日期</b> </td>");
        strb.Append(" <td colspan=\"2\"> <b>" + sdate + " 至 " + edate + "</b> </td>");
        strb.Append(" </tr>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>公司名称</b> </td>");
        strb.Append(" <td> <b>联系人</b> </td>");
        strb.Append(" <td> <b>电话</b> </td>");
        strb.Append(" <td> <b>岗位名称</b> </td>");
        strb.Append(" <td> <b>招聘人数</b> </td>");
        strb.Append(" <td> <b>工作性质</b> </td>");
        strb.Append(" <td> <b>薪金待遇</b> </td>");
        strb.Append(" <td> <b>性别要求</b> </td>");
        strb.Append(" <td> <b>学历要求</b> </td>");
        strb.Append(" <td> <b>工作地区</b> </td>");
        strb.Append(" <td> <b>职位类型</b> </td>");
        strb.Append(" <td> <b>发布日期</b> </td>");
        strb.Append(" <td> <b>截止日期</b> </td>");
        strb.Append(" <td> <b>其他要求</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["cu_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["cu_contact"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["cu_tel"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_num"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["kind"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["salary"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["sex"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["edu"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["area"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["positionType"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_inserttime"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["deadline"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_memo"].ToString() + " </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    public void ExcelPersonTel()
    {
        try
        {
            string key = Request["key"];
            string state = Request["state"];
            string type = Request["type"];
            string edu = Request["edu"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            string yx1 = Request["yx1"];
            string yx2 = Request["yx2"];
            string major1 = Request["major1"];
            string major2 = Request["major2"];
            DataTable dt = new sql().GetPersonTelList(key, state, type, edu, sdate, edate, yx1, yx2, major1, major2);
            if (dt != null && dt.Rows.Count > 0)
            {
                CreatePersonTelExcel(dt, "求职人才手机号码");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    public void ExcelPersonMobile()
    {
        try
        {
            string type1 = Request["type1"];
            string type2 = Request["type2"];
            string major1 = Request["major1"];
            string major2 = Request["major2"];
            string edu = Request["edu"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetPersonTelList(type1, type2, major1, major2, edu, sdate, edate);
            if (dt != null && dt.Rows.Count > 0)
            {
                CreatePersonTelExcel(dt, "求职人才手机号码");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }
    
    protected void CreatePersonTelExcel(DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>姓名</b> </td>");
        strb.Append(" <td> <b>手机号码</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_name"].ToString() + " </td>");
            if (!string.IsNullOrEmpty(dt.Rows[i]["fw_mobile"].ToString()))
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["fw_mobile"].ToString() + " </td>");
            else
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["pi_mobile"].ToString() + " </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    public void ExcelCompanyTel()
    {
        try
        {
            string key = Request["key"];
            string level = Request["level"];
            string state = Request["state"];
            string type = Request["type"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            string trade = Request["trade"];
            string property = Request["property"];
            string area = Request["area"];
            string logins = Request["logins"];
            string logine = Request["logine"];
            DataTable dt = new sql().GetCompanyTelList(key, level, state, type, sdate, edate, trade, property, area, logins, logine);
            if (dt != null && dt.Rows.Count > 0)
            {
                CreateCompanyTelExcel(dt, "单位短信联系人手机号码");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    protected void CreateCompanyTelExcel(DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>单位</b> </td>");
        strb.Append(" <td> <b>短信联系人</b> </td>");
        strb.Append(" <td> <b>手机号码</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["cu_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["cu_msgname"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["cu_msgmobile"].ToString() + " </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    public void ExcelDelayByType()
    {
        try
        {
            string type = Request["type"];
            string typename = Request["typename"];
            string sdate = Request["sdate"];
            string edate = Request["edate"];
            DataTable dt = new sql().GetSDelayByTypeList(type, sdate, edate);
            DataTable dt1 = new sql().GetSDelayCountByType(type, sdate, edate);
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dr["jt_id"] = "0";
                dr["jt_name"] = "合计";
                dr["re_count"] = dt1.Rows[0]["jobcount"];
                dr["re_percent"] = 100;
                dt.Rows.Add(dr);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                CreateDelayJobByTypeExcel(typename, sdate, edate, dt, "紧缺职位统计(按延期次数)");
            }
        }
        catch (Exception e)
        {
            Response.Write("");
        }
    }

    protected void CreateDelayJobByTypeExcel(string type, string sdate, string edate, DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>时间段</b> </td>");
        strb.Append(" <td colspan=\"2\"> <b>" + sdate + " 至 " + edate + "</b> </td>");
        strb.Append(" </tr>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>岗位类别</b> </td>");
        strb.Append(" <td> <b>延期次数</b> </td>");
        strb.Append(" <td> <b>所占比例</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            if (string.IsNullOrEmpty(dt.Rows[i]["jt_name"].ToString()))
                strb.Append(" <td class='xl26'>" + type + " </td>");
            else
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["jt_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_count"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["re_percent"].ToString() + "% </td>");
            strb.Append(" </tr>");
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }

    protected void CreateShopWindowExcel(string sdate, string edate, DataTable dt, string fileName)
    {
        StringBuilder strb = new StringBuilder();
        strb.Append(" <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"");
        strb.Append("xmlns:x=\"urn:schemas-microsoft-com:office:excel\"");
        strb.Append("xmlns=\"http://www.w3.org/TR/REC-html40\">");
        strb.Append(" <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
        strb.Append(" <style>"); strb.Append(".xl26");
        strb.Append(" {mso-style-parent:style0;");
        strb.Append(" font-family:\"Times New Roman\", serif;");
        strb.Append(" mso-font-charset:0;");
        strb.Append(" mso-number-format:\"@\";}");
        strb.Append(" </style>");
        strb.Append(" <xml>");
        strb.Append(" <x:ExcelWorkbook>");
        strb.Append(" <x:ExcelWorksheets>");
        strb.Append(" <x:ExcelWorksheet>");
        strb.Append(" <x:Name>Sheet1</x:Name>");
        strb.Append(" <x:WorksheetOptions>");
        strb.Append(" <x:DefaultRowHeight>285 </x:DefaultRowHeight>");
        strb.Append(" <x:Selected/>");
        strb.Append(" <x:Panes>");
        strb.Append(" <x:Pane>");
        strb.Append(" <x:Number>3 </x:Number>");
        strb.Append(" <x:ActiveCol>1 </x:ActiveCol>");
        strb.Append(" </x:Pane>");
        strb.Append(" </x:Panes>");
        strb.Append(" <x:ProtectContents>False</x:ProtectContents>");
        strb.Append(" <x:ProtectObjects>False</x:ProtectObjects>");
        strb.Append(" <x:ProtectScenarios>False</x:ProtectScenarios>");
        strb.Append(" </x:WorksheetOptions>");
        strb.Append(" </x:ExcelWorksheet>");
        strb.Append(" <x:WindowHeight>6750 </x:WindowHeight>");
        strb.Append(" <x:WindowWidth>10620 </x:WindowWidth>");
        strb.Append(" <x:WindowTopX>480 </x:WindowTopX>");
        strb.Append(" <x:WindowTopY>75 </x:WindowTopY>");
        strb.Append(" <x:ProtectStructure>False </x:ProtectStructure>");
        strb.Append(" <x:ProtectWindows>False </x:ProtectWindows>");
        strb.Append(" </x:ExcelWorkbook>");
        strb.Append(" </xml>");
        strb.Append("");
        strb.Append(" </head> <body>");
        strb.Append(" <table align=\"center\" style='border-collapse:collapse;table-layout:fixed'>");
        strb.Append(" <tr>");
        strb.Append(" <td colspan='8' align='center'> <b> 时间段：" + sdate + edate + " </b> </td>");
        strb.Append(" </tr>");
        strb.Append(" <tr>");
        strb.Append(" <td> <b>单位名称</b> </td>");
        strb.Append(" <td> <b>联 系 人</b> </td>");
        strb.Append(" <td> <b>联系电话</b> </td>");
        strb.Append(" <td> <b>招聘岗位</b> </td>");
        strb.Append(" <td> <b>人    数</b> </td>");
        strb.Append(" <td> <b>学    历</b> </td>");
        strb.Append(" <td> <b>月薪待遇</b> </td>");
        strb.Append(" <td> <b>其他要求</b> </td>");
        strb.Append(" </tr>");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strb.Append(" <tr>");
            int j = 1;
            if (!string.IsNullOrEmpty(dt.Rows[i]["sw_recruit2"].ToString()))
                j++;
            if (!string.IsNullOrEmpty(dt.Rows[i]["sw_recruit3"].ToString()))
                j++;
            if (!string.IsNullOrEmpty(dt.Rows[i]["sw_recruit4"].ToString()))
                j++;
            if (!string.IsNullOrEmpty(dt.Rows[i]["sw_recruit5"].ToString()))
                j++;
            if (!string.IsNullOrEmpty(dt.Rows[i]["sw_recruit6"].ToString()))
                j++;
            strb.Append(" <td class='xl26' rowspan='" + j + "'>" + dt.Rows[i]["sw_name"].ToString() + " </td>");
            strb.Append(" <td class='xl26' rowspan='" + j + "'>" + dt.Rows[i]["sw_contact"].ToString() + " </td>");
            strb.Append(" <td class='xl26' rowspan='" + j + "'>" + dt.Rows[i]["sw_tel"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_recruit1"].ToString() + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_num1"].ToString() + " </td>");
            string edu = "";
            if ("1".Equals(dt.Rows[i]["sw_edu1"].ToString()))
                edu = "初中";
            else if ("2".Equals(dt.Rows[i]["sw_edu1"].ToString()))
                edu = "高中";
            else if ("3".Equals(dt.Rows[i]["sw_edu1"].ToString()))
                edu = "中技";
            else if ("4".Equals(dt.Rows[i]["sw_edu1"].ToString()))
                edu = "中专";
            else if ("5".Equals(dt.Rows[i]["sw_edu1"].ToString()))
                edu = "大专";
            else if ("6".Equals(dt.Rows[i]["sw_edu1"].ToString()))
                edu = "本科";
            else if ("7".Equals(dt.Rows[i]["sw_edu1"].ToString()))
                edu = "硕士";
            else if ("8".Equals(dt.Rows[i]["sw_edu1"].ToString()))
                edu = "博士";
            else if ("9".Equals(dt.Rows[i]["sw_edu1"].ToString()))
                edu = "博士后";
            else if ("99".Equals(dt.Rows[i]["sw_edu1"].ToString()))
                edu = "不限";
            strb.Append(" <td class='xl26'>" + edu + dt.Rows[i]["sw_edumore1"].ToString() + " </td>");
            string pay = "";
            if ("1".Equals(dt.Rows[i]["sw_paybegin1"].ToString()))
                pay = "1000~1500";
            else if ("2".Equals(dt.Rows[i]["sw_paybegin1"].ToString()))
                pay = "1500~2000";
            else if ("3".Equals(dt.Rows[i]["sw_paybegin1"].ToString()))
                pay = "2000~3000";
            else if ("4".Equals(dt.Rows[i]["sw_paybegin1"].ToString()))
                pay = "3000~5000";
            else if ("5".Equals(dt.Rows[i]["sw_paybegin1"].ToString()))
                pay = "5000~10000";
            else if ("6".Equals(dt.Rows[i]["sw_paybegin1"].ToString()))
                pay = "10000以上";
            strb.Append(" <td class='xl26'>" + pay + " </td>");
            strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_memo1"].ToString() + " </td>");
            strb.Append(" </tr>");
            if (!string.IsNullOrEmpty(dt.Rows[i]["sw_recruit2"].ToString()))
            {
                strb.Append(" <tr>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_recruit2"].ToString() + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_num2"].ToString() + " </td>");
                edu = "";
                if ("1".Equals(dt.Rows[i]["sw_edu2"].ToString()))
                    edu = "初中";
                else if ("2".Equals(dt.Rows[i]["sw_edu2"].ToString()))
                    edu = "高中";
                else if ("3".Equals(dt.Rows[i]["sw_edu2"].ToString()))
                    edu = "中技";
                else if ("4".Equals(dt.Rows[i]["sw_edu2"].ToString()))
                    edu = "中专";
                else if ("5".Equals(dt.Rows[i]["sw_edu2"].ToString()))
                    edu = "大专";
                else if ("6".Equals(dt.Rows[i]["sw_edu2"].ToString()))
                    edu = "本科";
                else if ("7".Equals(dt.Rows[i]["sw_edu2"].ToString()))
                    edu = "硕士";
                else if ("8".Equals(dt.Rows[i]["sw_edu2"].ToString()))
                    edu = "博士";
                else if ("9".Equals(dt.Rows[i]["sw_edu2"].ToString()))
                    edu = "博士后";
                else if ("99".Equals(dt.Rows[i]["sw_edu2"].ToString()))
                    edu = "不限";
                strb.Append(" <td class='xl26'>" + edu + dt.Rows[i]["sw_edumore2"].ToString() + " </td>");
                pay = "";
                if ("1".Equals(dt.Rows[i]["sw_paybegin2"].ToString()))
                    pay = "1000~1500";
                else if ("2".Equals(dt.Rows[i]["sw_paybegin2"].ToString()))
                    pay = "1500~2000";
                else if ("3".Equals(dt.Rows[i]["sw_paybegin2"].ToString()))
                    pay = "2000~3000";
                else if ("4".Equals(dt.Rows[i]["sw_paybegin2"].ToString()))
                    pay = "3000~5000";
                else if ("5".Equals(dt.Rows[i]["sw_paybegin2"].ToString()))
                    pay = "5000~10000";
                else if ("6".Equals(dt.Rows[i]["sw_paybegin2"].ToString()))
                    pay = "10000以上";
                strb.Append(" <td class='xl26'>" + pay + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_memo2"].ToString() + " </td>");
                strb.Append(" </tr>");
            }
            if (!string.IsNullOrEmpty(dt.Rows[i]["sw_recruit3"].ToString()))
            {
                strb.Append(" <tr>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_recruit3"].ToString() + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_num3"].ToString() + " </td>");
                edu = "";
                if ("1".Equals(dt.Rows[i]["sw_edu3"].ToString()))
                    edu = "初中";
                else if ("2".Equals(dt.Rows[i]["sw_edu3"].ToString()))
                    edu = "高中";
                else if ("3".Equals(dt.Rows[i]["sw_edu3"].ToString()))
                    edu = "中技";
                else if ("4".Equals(dt.Rows[i]["sw_edu3"].ToString()))
                    edu = "中专";
                else if ("5".Equals(dt.Rows[i]["sw_edu3"].ToString()))
                    edu = "大专";
                else if ("6".Equals(dt.Rows[i]["sw_edu3"].ToString()))
                    edu = "本科";
                else if ("7".Equals(dt.Rows[i]["sw_edu3"].ToString()))
                    edu = "硕士";
                else if ("8".Equals(dt.Rows[i]["sw_edu3"].ToString()))
                    edu = "博士";
                else if ("9".Equals(dt.Rows[i]["sw_edu3"].ToString()))
                    edu = "博士后";
                else if ("99".Equals(dt.Rows[i]["sw_edu3"].ToString()))
                    edu = "不限";
                strb.Append(" <td class='xl26'>" + edu + dt.Rows[i]["sw_edumore3"].ToString() + " </td>");
                pay = "";
                if ("1".Equals(dt.Rows[i]["sw_paybegin3"].ToString()))
                    pay = "1000~1500";
                else if ("2".Equals(dt.Rows[i]["sw_paybegin3"].ToString()))
                    pay = "1500~2000";
                else if ("3".Equals(dt.Rows[i]["sw_paybegin3"].ToString()))
                    pay = "2000~3000";
                else if ("4".Equals(dt.Rows[i]["sw_paybegin3"].ToString()))
                    pay = "3000~5000";
                else if ("5".Equals(dt.Rows[i]["sw_paybegin3"].ToString()))
                    pay = "5000~10000";
                else if ("6".Equals(dt.Rows[i]["sw_paybegin3"].ToString()))
                    pay = "10000以上";
                strb.Append(" <td class='xl26'>" + pay + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_memo3"].ToString() + " </td>");
                strb.Append(" </tr>");
            }
            if (!string.IsNullOrEmpty(dt.Rows[i]["sw_recruit4"].ToString()))
            {
                strb.Append(" <tr>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_recruit4"].ToString() + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_num4"].ToString() + " </td>");
                edu = "";
                if ("1".Equals(dt.Rows[i]["sw_edu4"].ToString()))
                    edu = "初中";
                else if ("2".Equals(dt.Rows[i]["sw_edu4"].ToString()))
                    edu = "高中";
                else if ("3".Equals(dt.Rows[i]["sw_edu4"].ToString()))
                    edu = "中技";
                else if ("4".Equals(dt.Rows[i]["sw_edu4"].ToString()))
                    edu = "中专";
                else if ("5".Equals(dt.Rows[i]["sw_edu4"].ToString()))
                    edu = "大专";
                else if ("6".Equals(dt.Rows[i]["sw_edu4"].ToString()))
                    edu = "本科";
                else if ("7".Equals(dt.Rows[i]["sw_edu4"].ToString()))
                    edu = "硕士";
                else if ("8".Equals(dt.Rows[i]["sw_edu4"].ToString()))
                    edu = "博士";
                else if ("9".Equals(dt.Rows[i]["sw_edu4"].ToString()))
                    edu = "博士后";
                else if ("99".Equals(dt.Rows[i]["sw_edu4"].ToString()))
                    edu = "不限";
                strb.Append(" <td class='xl26'>" + edu + dt.Rows[i]["sw_edumore4"].ToString() + " </td>");
                pay = "";
                if ("1".Equals(dt.Rows[i]["sw_paybegin4"].ToString()))
                    pay = "1000~1500";
                else if ("2".Equals(dt.Rows[i]["sw_paybegin4"].ToString()))
                    pay = "1500~2000";
                else if ("3".Equals(dt.Rows[i]["sw_paybegin4"].ToString()))
                    pay = "2000~3000";
                else if ("4".Equals(dt.Rows[i]["sw_paybegin4"].ToString()))
                    pay = "3000~5000";
                else if ("5".Equals(dt.Rows[i]["sw_paybegin4"].ToString()))
                    pay = "5000~10000";
                else if ("6".Equals(dt.Rows[i]["sw_paybegin4"].ToString()))
                    pay = "10000以上";
                strb.Append(" <td class='xl26'>" + pay + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_memo4"].ToString() + " </td>");
                strb.Append(" </tr>");
            }
            if (!string.IsNullOrEmpty(dt.Rows[i]["sw_recruit5"].ToString()))
            {
                strb.Append(" <tr>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_recruit5"].ToString() + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_num5"].ToString() + " </td>");
                edu = "";
                if ("1".Equals(dt.Rows[i]["sw_edu5"].ToString()))
                    edu = "初中";
                else if ("2".Equals(dt.Rows[i]["sw_edu5"].ToString()))
                    edu = "高中";
                else if ("3".Equals(dt.Rows[i]["sw_edu5"].ToString()))
                    edu = "中技";
                else if ("4".Equals(dt.Rows[i]["sw_edu5"].ToString()))
                    edu = "中专";
                else if ("5".Equals(dt.Rows[i]["sw_edu5"].ToString()))
                    edu = "大专";
                else if ("6".Equals(dt.Rows[i]["sw_edu5"].ToString()))
                    edu = "本科";
                else if ("7".Equals(dt.Rows[i]["sw_edu5"].ToString()))
                    edu = "硕士";
                else if ("8".Equals(dt.Rows[i]["sw_edu5"].ToString()))
                    edu = "博士";
                else if ("9".Equals(dt.Rows[i]["sw_edu5"].ToString()))
                    edu = "博士后";
                else if ("99".Equals(dt.Rows[i]["sw_edu5"].ToString()))
                    edu = "不限";
                strb.Append(" <td class='xl26'>" + edu + dt.Rows[i]["sw_edumore5"].ToString() + " </td>");
                pay = "";
                if ("1".Equals(dt.Rows[i]["sw_paybegin5"].ToString()))
                    pay = "1000~1500";
                else if ("2".Equals(dt.Rows[i]["sw_paybegin5"].ToString()))
                    pay = "1500~2000";
                else if ("3".Equals(dt.Rows[i]["sw_paybegin5"].ToString()))
                    pay = "2000~3000";
                else if ("4".Equals(dt.Rows[i]["sw_paybegin5"].ToString()))
                    pay = "3000~5000";
                else if ("5".Equals(dt.Rows[i]["sw_paybegin5"].ToString()))
                    pay = "5000~10000";
                else if ("6".Equals(dt.Rows[i]["sw_paybegin5"].ToString()))
                    pay = "10000以上";
                strb.Append(" <td class='xl26'>" + pay + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_memo5"].ToString() + " </td>");
                strb.Append(" </tr>");
            }
            if (!string.IsNullOrEmpty(dt.Rows[i]["sw_recruit6"].ToString()))
            {
                strb.Append(" <tr>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_recruit6"].ToString() + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_num6"].ToString() + " </td>");
                edu = "";
                if ("1".Equals(dt.Rows[i]["sw_edu6"].ToString()))
                    edu = "初中";
                else if ("2".Equals(dt.Rows[i]["sw_edu6"].ToString()))
                    edu = "高中";
                else if ("3".Equals(dt.Rows[i]["sw_edu6"].ToString()))
                    edu = "中技";
                else if ("4".Equals(dt.Rows[i]["sw_edu6"].ToString()))
                    edu = "中专";
                else if ("5".Equals(dt.Rows[i]["sw_edu6"].ToString()))
                    edu = "大专";
                else if ("6".Equals(dt.Rows[i]["sw_edu6"].ToString()))
                    edu = "本科";
                else if ("7".Equals(dt.Rows[i]["sw_edu6"].ToString()))
                    edu = "硕士";
                else if ("8".Equals(dt.Rows[i]["sw_edu6"].ToString()))
                    edu = "博士";
                else if ("9".Equals(dt.Rows[i]["sw_edu6"].ToString()))
                    edu = "博士后";
                else if ("99".Equals(dt.Rows[i]["sw_edu6"].ToString()))
                    edu = "不限";
                strb.Append(" <td class='xl26'>" + edu + dt.Rows[i]["sw_edumore6"].ToString() + " </td>");
                pay = "";
                if ("1".Equals(dt.Rows[i]["sw_paybegin6"].ToString()))
                    pay = "1000~1500";
                else if ("2".Equals(dt.Rows[i]["sw_paybegin6"].ToString()))
                    pay = "1500~2000";
                else if ("3".Equals(dt.Rows[i]["sw_paybegin6"].ToString()))
                    pay = "2000~3000";
                else if ("4".Equals(dt.Rows[i]["sw_paybegin6"].ToString()))
                    pay = "3000~5000";
                else if ("5".Equals(dt.Rows[i]["sw_paybegin6"].ToString()))
                    pay = "5000~10000";
                else if ("6".Equals(dt.Rows[i]["sw_paybegin6"].ToString()))
                    pay = "10000以上";
                strb.Append(" <td class='xl26'>" + pay + " </td>");
                strb.Append(" <td class='xl26'>" + dt.Rows[i]["sw_memo6"].ToString() + " </td>");
                strb.Append(" </tr>");
            }
        }
        strb.Append(" </table></body> </html>");
        Response.Clear();
        Response.Buffer = true;
        Response.Charset = "GB2312";
        if ("IE".Equals(Request.Browser.Browser))
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
        else
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + Encoding.GetEncoding("GB2312").GetString(Encoding.Default.GetBytes(fileName)) + ".xls");
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/ms-excel";
        this.EnableViewState = false;
        Response.Write(strb);
        Response.End();
    }
}